package com.carrot.newsgallery.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Api(value = "榜单")
public class NewsMain {
    @ApiModelProperty(value = "自增主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private int newsMainId;
    @ApiModelProperty(value = "当日排名")
    @TableField(value = "`rank`")
    private int rank;
    @ApiModelProperty(value = "新闻标题")
    private String title;
    @ApiModelProperty(value = "新闻描述")
    private String description;
    @ApiModelProperty(value = "图片超链接")
    private String imagesrc;
    @ApiModelProperty(value = "新闻超链接")
    private String href;
    @ApiModelProperty(value = "新闻来源")
    private String source;
    @ApiModelProperty(value = "新闻创建时间")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "榜单识别代码")
    @TableField(exist = false)
    private String hubIdentity = "news_main";
}
